home *** CD-ROM | disk | FTP | other *** search
/ Stolen Data 2 / Stolen Data 2.adf / Source / NewBase.s < prev    next >
Text File  |  1989-11-02  |  1KB  |  58 lines

  1.  
  2. *****************************************************************************
  3. ;   Base routine - disable and return operating system, inc. copper macros
  4.  
  5. ;   Written - 17.1.90   Kreator - Anarchy UK
  6. *****************************************************************************
  7.  
  8.     Incdir    DF1:
  9.     Include    Source/CustomRegisters
  10.     Section    Base,Code_c
  11.  
  12. Trap_vec0    = $80
  13. Execbase    = $4
  14.  
  15.     Movem.l    d0-d7/a0-a6,-(a7)
  16.     Move.l    #Start,Trap_vec0
  17.     Trap    #0
  18.     Movem.l    (a7)+,d0-d7/a0-a6
  19.     Rts
  20.  
  21. Start
  22.     Bsr    Killsys
  23.     Bsr    Setup
  24.     Bsr    Main
  25.     Bsr    Sysreturn
  26.     Rte
  27.  
  28. *****************************************************************************
  29. ;Killsys - Disable operating system and interrupts
  30. *****************************************************************************
  31. Killsys    Move    Intenar,Int_set
  32.     Move    #$7fff,Intena
  33.     Move    Dmaconr,Dma_set
  34.     Move    #$7fff,Dmacon
  35.     Move    #$87cf,Dmacon
  36.     Move.l    Execbase,a6
  37.     Lea    Gfxname(pc),a1
  38.     Jsr    -
  39.     Rts
  40.  
  41. Int_set    Dc.w    0
  42. Dma_set    Dc.w    0
  43.  
  44. *****************************************************************************
  45. ;Sysreturn - Re-enable operating system and interrupts
  46. *****************************************************************************
  47. Sysreturn
  48.     Move    #$7fff,Intena
  49.     Move    Int_set(pc),d0
  50.     Or    #$c000,d0
  51.     Move    d0,Intena
  52.     Move    #$7fff,Dmacon
  53.     Move    Dma_set(pc),d0
  54.     Or    #$8200,d0
  55.     Move    d0,Dmacon
  56.  
  57.  
  58.